﻿using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using LibKetoan;

namespace Ketoan
{
	/// <summary>
	/// Summary description for Form1.
	/// </summary>
	public class frmMain : System.Windows.Forms.Form
	{
		private LibKetoan.AccessData a=new LibKetoan.AccessData();
		private string s_userid="",s_right="",s_mmyy="1208",s_ngay="",s_chuong="",s_lk="",s_chucnang="",s_lctug="",s_nghiepvu="";
		private string s_yyyy="";
		public int i_userid=0;
		private bool b_admin;
		private DataSet ds=new DataSet();
		private System.Windows.Forms.MainMenu mainMenu1;
		private System.Windows.Forms.MenuItem menuItem1;
		private System.Windows.Forms.MenuItem menuItem2;
		private System.Windows.Forms.MenuItem menuItem3;
		private System.Windows.Forms.MenuItem menuItem4;
		private System.Windows.Forms.MenuItem menuItem5;
		private System.Windows.Forms.MenuItem menuItem6;
		private System.Windows.Forms.MenuItem menuItem12;
		private System.Windows.Forms.MenuItem menuItem13;
		private System.Windows.Forms.MenuItem menuItem14;
		private System.Windows.Forms.MenuItem menuItem15;
		private System.Windows.Forms.MenuItem menuItem16;
		private System.Windows.Forms.MenuItem menuItem17;
		private System.Windows.Forms.MenuItem menuItem23;
		private System.Windows.Forms.MenuItem menuItem24;
		private System.Windows.Forms.MenuItem menuItem25;
		private System.Windows.Forms.MenuItem menuItem7;
		private System.Windows.Forms.MenuItem menuItem102;
		private System.Windows.Forms.MenuItem menuItem104;
		private System.Windows.Forms.MenuItem menuItem50;
		private System.Windows.Forms.MenuItem m24;
		private System.Windows.Forms.MenuItem menuItem19;
		private System.Windows.Forms.MenuItem menuItem20;
		private System.Windows.Forms.MenuItem menuItem21;
		private System.Windows.Forms.MenuItem menuItem27;
		private System.Windows.Forms.MenuItem menuItem28;
		private System.Windows.Forms.MenuItem menuItem29;
		private System.Windows.Forms.MenuItem menuItem30;
		private System.Windows.Forms.MenuItem menuItem31;
		private System.Windows.Forms.MenuItem menuItem32;
		private System.Windows.Forms.MenuItem menuItem33;
		private System.Windows.Forms.MenuItem menuItem34;
		private System.Windows.Forms.MenuItem menuItem35;
		private System.Windows.Forms.MenuItem menuItem36;
		private System.Windows.Forms.MenuItem menuItem37;
		private System.Windows.Forms.MenuItem menuItem38;
		private System.Windows.Forms.MenuItem menuItem39;
		private System.Windows.Forms.MenuItem menuItem40;
		private System.Windows.Forms.MenuItem menuItem42;
		private System.Windows.Forms.MenuItem menuItem43;
		private System.Windows.Forms.MenuItem menuItem44;
		private System.Windows.Forms.MenuItem menuItem47;
		private System.Windows.Forms.MenuItem menuItem49;
		private System.Windows.Forms.MenuItem menuItem58;
		private System.Windows.Forms.MenuItem menuItem62;
		private System.Windows.Forms.MenuItem menuItem66;
		private System.Windows.Forms.MenuItem m0;
		private System.Windows.Forms.MenuItem m1;
		private System.Windows.Forms.MenuItem m2;
		private System.Windows.Forms.MenuItem m4;
		private System.Windows.Forms.MenuItem m6;
		private System.Windows.Forms.MenuItem m7;
		private System.Windows.Forms.MenuItem m3;
		private System.Windows.Forms.MenuItem menuItem80;
		private System.Windows.Forms.MenuItem m60;
		private System.Windows.Forms.MenuItem m61;
		private System.Windows.Forms.MenuItem menuItem8;
		private System.Windows.Forms.MenuItem m63;
		private System.Windows.Forms.MenuItem m64;
		private System.Windows.Forms.MenuItem m65;
		private System.Windows.Forms.MenuItem menuItem9;
		private System.Windows.Forms.MenuItem m66;
		private System.Windows.Forms.MenuItem m67;
		private System.Windows.Forms.MenuItem m68;
		private System.Windows.Forms.MenuItem m69;
		private System.Windows.Forms.MenuItem m18;
		private System.Windows.Forms.MenuItem m19;
		private System.Windows.Forms.MenuItem menuItem10;
		private System.Windows.Forms.MenuItem menuItem11;
		private System.Windows.Forms.MenuItem menuItem18;
		private System.Windows.Forms.MenuItem menuItem26;
		private System.Windows.Forms.MenuItem menuItem41;
		private System.Windows.Forms.MenuItem menuItem45;
		private System.Windows.Forms.MenuItem menuItem46;
		private System.Windows.Forms.MenuItem menuItem51;
		private System.Windows.Forms.MenuItem menuItem52;
		private System.Windows.Forms.MenuItem menuItem53;
		private System.Windows.Forms.MenuItem menuItem54;
		private System.Windows.Forms.MenuItem menuItem55;
		private System.Windows.Forms.MenuItem menuItem56;
		private System.Windows.Forms.MenuItem menuItem57;
		private System.Windows.Forms.MenuItem menuItem59;
		private System.Windows.Forms.MenuItem menuItem60;
		private System.Windows.Forms.MenuItem menuItem61;
		private System.Windows.Forms.MenuItem menuItem63;
		private System.Windows.Forms.MenuItem menuItem64;
		private System.Windows.Forms.MenuItem menuItem65;
		private System.Windows.Forms.MenuItem menuItem67;
		private System.Windows.Forms.MenuItem menuItem68;
		private System.Windows.Forms.MenuItem menuItem69;
		private System.Windows.Forms.MenuItem m94;
		private System.Windows.Forms.MenuItem m83;
		private System.Windows.Forms.MenuItem menuItem48;
		private System.Windows.Forms.MenuItem menuItem71;
		private System.Windows.Forms.MenuItem m95;
		private System.Windows.Forms.MenuItem menuItem72;
		private System.Windows.Forms.MenuItem menuItem70;
		private System.Windows.Forms.MenuItem menuItem73;
		private System.Windows.Forms.MenuItem menuItem74;
		private System.Windows.Forms.MenuItem menuItem75;
		private System.Windows.Forms.MenuItem menuItem76;
		private System.Windows.Forms.MenuItem menuItem77;
		private System.Windows.Forms.MenuItem menuItem78;
		private System.Windows.Forms.MenuItem menuItem79;
		private System.Windows.Forms.MenuItem menuItem81;
		private System.Windows.Forms.MenuItem menuItem82;
		private System.Windows.Forms.MenuItem menuItem83;
		private System.Windows.Forms.MenuItem menuItem84;
		private System.Windows.Forms.MenuItem menuItem85;
		private System.Windows.Forms.MenuItem menuItem86;
		private System.Windows.Forms.MenuItem menuItem87;
		private System.Windows.Forms.MenuItem menuItem88;
		private System.Windows.Forms.MenuItem menuItem89;
		private System.Windows.Forms.MenuItem menuItem90;
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public frmMain()
		{			
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();
			//if (System.IO.File.Exists(a.Thongso("hinh").Trim()))
			//	this.BackgroundImage=Image.FromFile(a.Thongso("hinh").Trim());
			/*if (Screen.PrimaryScreen.WorkingArea.Width <= 800)
				if (System.IO.File.Exists("khottb_800.jpg")) this.BackgroundImage=Image.FromFile("khottb_800.jpg");
			*/
			this.Text=a.Msg;
			//this.menuItem17.Text = "&2. About "+a.Msg;
			//
			// TODO: Add any constructor code after InitializeComponent call
			//
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if (components != null) 
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
			System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
			this.mainMenu1 = new System.Windows.Forms.MainMenu();
			this.menuItem1 = new System.Windows.Forms.MenuItem();
			this.m0 = new System.Windows.Forms.MenuItem();
			this.m1 = new System.Windows.Forms.MenuItem();
			this.m63 = new System.Windows.Forms.MenuItem();
			this.m2 = new System.Windows.Forms.MenuItem();
			this.m3 = new System.Windows.Forms.MenuItem();
			this.m4 = new System.Windows.Forms.MenuItem();
			this.m65 = new System.Windows.Forms.MenuItem();
			this.menuItem2 = new System.Windows.Forms.MenuItem();
			this.m6 = new System.Windows.Forms.MenuItem();
			this.menuItem11 = new System.Windows.Forms.MenuItem();
			this.menuItem18 = new System.Windows.Forms.MenuItem();
			this.menuItem52 = new System.Windows.Forms.MenuItem();
			this.menuItem53 = new System.Windows.Forms.MenuItem();
			this.menuItem54 = new System.Windows.Forms.MenuItem();
			this.menuItem49 = new System.Windows.Forms.MenuItem();
			this.menuItem26 = new System.Windows.Forms.MenuItem();
			this.menuItem41 = new System.Windows.Forms.MenuItem();
			this.menuItem45 = new System.Windows.Forms.MenuItem();
			this.m69 = new System.Windows.Forms.MenuItem();
			this.menuItem46 = new System.Windows.Forms.MenuItem();
			this.menuItem51 = new System.Windows.Forms.MenuItem();
			this.menuItem58 = new System.Windows.Forms.MenuItem();
			this.menuItem48 = new System.Windows.Forms.MenuItem();
			this.menuItem71 = new System.Windows.Forms.MenuItem();
			this.menuItem47 = new System.Windows.Forms.MenuItem();
			this.m7 = new System.Windows.Forms.MenuItem();
			this.menuItem62 = new System.Windows.Forms.MenuItem();
			this.m94 = new System.Windows.Forms.MenuItem();
			this.m18 = new System.Windows.Forms.MenuItem();
			this.m19 = new System.Windows.Forms.MenuItem();
			this.menuItem55 = new System.Windows.Forms.MenuItem();
			this.menuItem56 = new System.Windows.Forms.MenuItem();
			this.menuItem57 = new System.Windows.Forms.MenuItem();
			this.menuItem59 = new System.Windows.Forms.MenuItem();
			this.menuItem60 = new System.Windows.Forms.MenuItem();
			this.menuItem61 = new System.Windows.Forms.MenuItem();
			this.menuItem7 = new System.Windows.Forms.MenuItem();
			this.menuItem66 = new System.Windows.Forms.MenuItem();
			this.menuItem10 = new System.Windows.Forms.MenuItem();
			this.menuItem63 = new System.Windows.Forms.MenuItem();
			this.menuItem64 = new System.Windows.Forms.MenuItem();
			this.menuItem65 = new System.Windows.Forms.MenuItem();
			this.menuItem67 = new System.Windows.Forms.MenuItem();
			this.menuItem68 = new System.Windows.Forms.MenuItem();
			this.menuItem69 = new System.Windows.Forms.MenuItem();
			this.m83 = new System.Windows.Forms.MenuItem();
			this.menuItem72 = new System.Windows.Forms.MenuItem();
			this.menuItem87 = new System.Windows.Forms.MenuItem();
			this.menuItem88 = new System.Windows.Forms.MenuItem();
			this.menuItem89 = new System.Windows.Forms.MenuItem();
			this.menuItem70 = new System.Windows.Forms.MenuItem();
			this.menuItem73 = new System.Windows.Forms.MenuItem();
			this.menuItem74 = new System.Windows.Forms.MenuItem();
			this.menuItem75 = new System.Windows.Forms.MenuItem();
			this.menuItem76 = new System.Windows.Forms.MenuItem();
			this.menuItem77 = new System.Windows.Forms.MenuItem();
			this.menuItem78 = new System.Windows.Forms.MenuItem();
			this.menuItem79 = new System.Windows.Forms.MenuItem();
			this.menuItem81 = new System.Windows.Forms.MenuItem();
			this.menuItem82 = new System.Windows.Forms.MenuItem();
			this.menuItem83 = new System.Windows.Forms.MenuItem();
			this.menuItem84 = new System.Windows.Forms.MenuItem();
			this.menuItem3 = new System.Windows.Forms.MenuItem();
			this.menuItem27 = new System.Windows.Forms.MenuItem();
			this.menuItem28 = new System.Windows.Forms.MenuItem();
			this.menuItem29 = new System.Windows.Forms.MenuItem();
			this.menuItem30 = new System.Windows.Forms.MenuItem();
			this.menuItem31 = new System.Windows.Forms.MenuItem();
			this.menuItem32 = new System.Windows.Forms.MenuItem();
			this.menuItem33 = new System.Windows.Forms.MenuItem();
			this.menuItem34 = new System.Windows.Forms.MenuItem();
			this.menuItem35 = new System.Windows.Forms.MenuItem();
			this.menuItem36 = new System.Windows.Forms.MenuItem();
			this.menuItem37 = new System.Windows.Forms.MenuItem();
			this.menuItem38 = new System.Windows.Forms.MenuItem();
			this.menuItem39 = new System.Windows.Forms.MenuItem();
			this.menuItem40 = new System.Windows.Forms.MenuItem();
			this.m64 = new System.Windows.Forms.MenuItem();
			this.m66 = new System.Windows.Forms.MenuItem();
			this.m67 = new System.Windows.Forms.MenuItem();
			this.m68 = new System.Windows.Forms.MenuItem();
			this.menuItem19 = new System.Windows.Forms.MenuItem();
			this.menuItem20 = new System.Windows.Forms.MenuItem();
			this.menuItem21 = new System.Windows.Forms.MenuItem();
			this.menuItem42 = new System.Windows.Forms.MenuItem();
			this.menuItem44 = new System.Windows.Forms.MenuItem();
			this.menuItem43 = new System.Windows.Forms.MenuItem();
			this.m61 = new System.Windows.Forms.MenuItem();
			this.m95 = new System.Windows.Forms.MenuItem();
			this.menuItem50 = new System.Windows.Forms.MenuItem();
			this.menuItem8 = new System.Windows.Forms.MenuItem();
			this.menuItem23 = new System.Windows.Forms.MenuItem();
			this.menuItem24 = new System.Windows.Forms.MenuItem();
			this.menuItem80 = new System.Windows.Forms.MenuItem();
			this.menuItem25 = new System.Windows.Forms.MenuItem();
			this.menuItem104 = new System.Windows.Forms.MenuItem();
			this.m24 = new System.Windows.Forms.MenuItem();
			this.menuItem102 = new System.Windows.Forms.MenuItem();
			this.menuItem9 = new System.Windows.Forms.MenuItem();
			this.menuItem86 = new System.Windows.Forms.MenuItem();
			this.menuItem85 = new System.Windows.Forms.MenuItem();
			this.m60 = new System.Windows.Forms.MenuItem();
			this.menuItem4 = new System.Windows.Forms.MenuItem();
			this.menuItem12 = new System.Windows.Forms.MenuItem();
			this.menuItem13 = new System.Windows.Forms.MenuItem();
			this.menuItem14 = new System.Windows.Forms.MenuItem();
			this.menuItem5 = new System.Windows.Forms.MenuItem();
			this.menuItem15 = new System.Windows.Forms.MenuItem();
			this.menuItem16 = new System.Windows.Forms.MenuItem();
			this.menuItem17 = new System.Windows.Forms.MenuItem();
			this.menuItem6 = new System.Windows.Forms.MenuItem();
			this.menuItem90 = new System.Windows.Forms.MenuItem();
			// 
			// mainMenu1
			// 
			this.mainMenu1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem1,
																					  this.menuItem2,
																					  this.menuItem7,
																					  this.menuItem70,
																					  this.menuItem3,
																					  this.menuItem4,
																					  this.menuItem5,
																					  this.menuItem6});
			// 
			// menuItem1
			// 
			this.menuItem1.Index = 0;
			this.menuItem1.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.m0,
																					  this.m1,
																					  this.m63,
																					  this.m2,
																					  this.m3,
																					  this.m4,
																					  this.m65,
																					  this.menuItem90});
			this.menuItem1.MergeOrder = 9001;
			this.menuItem1.Text = "Nhập chứng từ";
			// 
			// m0
			// 
			this.m0.Index = 0;
			this.m0.MergeOrder = 1;
			this.m0.Text = "Kế toán tiền mặt";
			this.m0.Click += new System.EventHandler(this.m0_Click);
			// 
			// m1
			// 
			this.m1.Index = 1;
			this.m1.MergeOrder = 2;
			this.m1.Text = "Kế toán ngân hàng - kho bạc";
			this.m1.Click += new System.EventHandler(this.m1_Click);
			// 
			// m63
			// 
			this.m63.Index = 2;
			this.m63.MergeOrder = 3;
			this.m63.Text = "Kế toán vật tư hàng hóa";
			this.m63.Click += new System.EventHandler(this.m63_Click);
			// 
			// m2
			// 
			this.m2.Index = 3;
			this.m2.MergeOrder = 4;
			this.m2.Text = "Kế toán các nghiệp vụ khác";
			this.m2.Click += new System.EventHandler(this.m2_Click);
			// 
			// m3
			// 
			this.m3.Index = 4;
			this.m3.MergeOrder = 5;
			this.m3.Text = "Tìm kiếm chứng từ";
			this.m3.Click += new System.EventHandler(this.m3_Click);
			// 
			// m4
			// 
			this.m4.Index = 5;
			this.m4.MergeOrder = 6;
			this.m4.Text = "Lập chứng từ ghi sổ";
			this.m4.Click += new System.EventHandler(this.m4_Click);
			// 
			// m65
			// 
			this.m65.Index = 6;
			this.m65.MergeOrder = 7;
			this.m65.Text = "Bảng kê chứng từ đề nghị thanh toán tạm ứng kinh phí";
			this.m65.Click += new System.EventHandler(this.m65_Click);
			// 
			// menuItem2
			// 
			this.menuItem2.Index = 1;
			this.menuItem2.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.m6,
																					  this.menuItem52,
																					  this.menuItem49,
																					  this.m69,
																					  this.menuItem58,
																					  this.menuItem47,
																					  this.m7,
																					  this.menuItem62,
																					  this.m94,
																					  this.m18,
																					  this.m19,
																					  this.menuItem55,
																					  this.menuItem59,
																					  this.menuItem60,
																					  this.menuItem61});
			this.menuItem2.MergeOrder = 9002;
			this.menuItem2.Text = "Sổ kế toán";
			// 
			// m6
			// 
			this.m6.Index = 0;
			this.m6.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																			   this.menuItem11,
																			   this.menuItem18});
			this.m6.MergeOrder = 8;
			this.m6.Text = "Sổ quỹ tiền mặt";
			// 
			// menuItem11
			// 
			this.menuItem11.Index = 0;
			this.menuItem11.MergeOrder = 9;
			this.menuItem11.Text = "Sổ quỹ tiền mặt chi tiết";
			this.menuItem11.Click += new System.EventHandler(this.menuItem11_Click);
			// 
			// menuItem18
			// 
			this.menuItem18.Index = 1;
			this.menuItem18.MergeOrder = 10;
			this.menuItem18.Text = "Sổ quỹ tiền mặt tổng hợp";
			this.menuItem18.Click += new System.EventHandler(this.m6_Click);
			// 
			// menuItem52
			// 
			this.menuItem52.Index = 1;
			this.menuItem52.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem53,
																					   this.menuItem54});
			this.menuItem52.MergeOrder = 11;
			this.menuItem52.Text = "Sổ tiền gửi ngân hàng";
			// 
			// menuItem53
			// 
			this.menuItem53.Index = 0;
			this.menuItem53.MergeOrder = 12;
			this.menuItem53.Text = "Sổ tiền gửi ngân hàng chi tiết";
			this.menuItem53.Click += new System.EventHandler(this.m73_Click);
			// 
			// menuItem54
			// 
			this.menuItem54.Index = 1;
			this.menuItem54.MergeOrder = 13;
			this.menuItem54.Text = "Sổ tiền gửi ngân hàng tổng hợp";
			this.menuItem54.Click += new System.EventHandler(this.m74_Click);
			// 
			// menuItem49
			// 
			this.menuItem49.Index = 2;
			this.menuItem49.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem26,
																					   this.menuItem41,
																					   this.menuItem45});
			this.menuItem49.MergeOrder = 14;
			this.menuItem49.Text = "Sổ cái";
			// 
			// menuItem26
			// 
			this.menuItem26.Index = 0;
			this.menuItem26.MergeOrder = 15;
			this.menuItem26.Text = "Sổ cái - chi tiết theo mục";
			this.menuItem26.Click += new System.EventHandler(this.m70_Click);
			// 
			// menuItem41
			// 
			this.menuItem41.Index = 1;
			this.menuItem41.MergeOrder = 16;
			this.menuItem41.Text = "Sổ cái tổng hợp";
			this.menuItem41.Click += new System.EventHandler(this.m71_Click);
			// 
			// menuItem45
			// 
			this.menuItem45.Index = 2;
			this.menuItem45.MergeOrder = 17;
			this.menuItem45.Text = "Sổ cái - S3B";
			this.menuItem45.Click += new System.EventHandler(this.m72_Click);
			// 
			// m69
			// 
			this.m69.Index = 3;
			this.m69.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																				this.menuItem46,
																				this.menuItem51});
			this.m69.MergeOrder = 18;
			this.m69.Text = "Chứng từ ghi sổ";
			// 
			// menuItem46
			// 
			this.menuItem46.Index = 0;
			this.menuItem46.MergeOrder = 19;
			this.menuItem46.Text = "Chứng từ ghi sổ";
			this.menuItem46.Click += new System.EventHandler(this.m69_Click);
			// 
			// menuItem51
			// 
			this.menuItem51.Index = 1;
			this.menuItem51.MergeOrder = 20;
			this.menuItem51.Text = "Sổ đăng ký chứng từ ghi sổ";
			this.menuItem51.Click += new System.EventHandler(this.menuItem49_Click);
			// 
			// menuItem58
			// 
			this.menuItem58.Index = 4;
			this.menuItem58.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem48,
																					   this.menuItem71});
			this.menuItem58.MergeOrder = 21;
			this.menuItem58.Text = "Sổ chi tiết các tài khoản";
			// 
			// menuItem48
			// 
			this.menuItem48.Index = 0;
			this.menuItem48.MergeOrder = 22;
			this.menuItem48.Text = "Sổ chi tiết các tài khoản (tài khoản công nợ)";
			this.menuItem48.Click += new System.EventHandler(this.menuItem48_Click_1);
			// 
			// menuItem71
			// 
			this.menuItem71.Index = 1;
			this.menuItem71.MergeOrder = 23;
			this.menuItem71.Text = "Sổ chi tiết các tài khoản";
			this.menuItem71.Click += new System.EventHandler(this.menuItem71_Click);
			// 
			// menuItem47
			// 
			this.menuItem47.Index = 5;
			this.menuItem47.MergeOrder = 24;
			this.menuItem47.Text = "Bảng tổng hợp công nợ";
			this.menuItem47.Click += new System.EventHandler(this.m13_Click);
			// 
			// m7
			// 
			this.m7.Index = 6;
			this.m7.MergeOrder = 25;
			this.m7.Text = "Sổ theo dõi tạm ứng";
			this.m7.Click += new System.EventHandler(this.menuItem48_Click);
			// 
			// menuItem62
			// 
			this.menuItem62.Index = 7;
			this.menuItem62.MergeOrder = 26;
			this.menuItem62.Text = "Sổ chi tiết chi hoạt động";
			this.menuItem62.Click += new System.EventHandler(this.m17_Click);
			// 
			// m94
			// 
			this.m94.Index = 8;
			this.m94.MergeOrder = 27;
			this.m94.Text = "Sổ chi tiết chi dự án";
			this.m94.Click += new System.EventHandler(this.m16_Click);
			// 
			// m18
			// 
			this.m18.Index = 9;
			this.m18.MergeOrder = 28;
			this.m18.Text = "Sổ theo dõi sử dụng nguồn kinh phí";
			this.m18.Click += new System.EventHandler(this.m18_Click);
			// 
			// m19
			// 
			this.m19.Index = 10;
			this.m19.MergeOrder = 29;
			this.m19.Text = "Sổ tổng hợp sử dụng nguồn kinh phí";
			this.m19.Click += new System.EventHandler(this.m19_Click);
			// 
			// menuItem55
			// 
			this.menuItem55.Index = 11;
			this.menuItem55.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem56,
																					   this.menuItem57});
			this.menuItem55.MergeOrder = 30;
			this.menuItem55.Text = "Sổ theo dõi dự toán";
			// 
			// menuItem56
			// 
			this.menuItem56.Index = 0;
			this.menuItem56.MergeOrder = 31;
			this.menuItem56.Text = "Giao dự toán";
			this.menuItem56.Click += new System.EventHandler(this.menuItem56_Click);
			// 
			// menuItem57
			// 
			this.menuItem57.Index = 1;
			this.menuItem57.MergeOrder = 32;
			this.menuItem57.Text = "Theo dõi nhận dự toán";
			this.menuItem57.Click += new System.EventHandler(this.menuItem57_Click);
			// 
			// menuItem59
			// 
			this.menuItem59.Index = 12;
			this.menuItem59.MergeOrder = 33;
			this.menuItem59.Text = "Sổ theo dõi tạm ứng kinh phí kho bạc";
			this.menuItem59.Click += new System.EventHandler(this.menuItem59_Click);
			// 
			// menuItem60
			// 
			this.menuItem60.Index = 13;
			this.menuItem60.MergeOrder = 34;
			this.menuItem60.Text = "Sổ chi tiết các khoản thu";
			this.menuItem60.Click += new System.EventHandler(this.menuItem60_Click);
			// 
			// menuItem61
			// 
			this.menuItem61.Index = 14;
			this.menuItem61.MergeOrder = 35;
			this.menuItem61.Text = "Sổ chi phí sản xuất kinh doanh";
			// 
			// menuItem7
			// 
			this.menuItem7.Index = 2;
			this.menuItem7.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem66,
																					  this.menuItem10,
																					  this.menuItem63,
																					  this.menuItem64,
																					  this.menuItem65,
																					  this.menuItem67,
																					  this.menuItem68,
																					  this.menuItem69,
																					  this.m83,
																					  this.menuItem72,
																					  this.menuItem87,
																					  this.menuItem88,
																					  this.menuItem89});
			this.menuItem7.MergeOrder = 9003;
			this.menuItem7.Text = "Báo cáo tài chính";
			// 
			// menuItem66
			// 
			this.menuItem66.Index = 0;
			this.menuItem66.MergeOrder = 36;
			this.menuItem66.Text = "Bảng cân đối tài khoản";
			this.menuItem66.Click += new System.EventHandler(this.menuItem66_Click);
			// 
			// menuItem10
			// 
			this.menuItem10.Index = 1;
			this.menuItem10.MergeOrder = 37;
			this.menuItem10.Text = "Bảng tổng hợp tình hình KP và Quyết toán KP đã sử dụng phần I";
			this.menuItem10.Click += new System.EventHandler(this.menuItem10_Click);
			// 
			// menuItem63
			// 
			this.menuItem63.Index = 2;
			this.menuItem63.MergeOrder = 38;
			this.menuItem63.Text = "Bảng tổng hợp tình hình KP và Quyết toán KP đã sử dụng phần II";
			this.menuItem63.Click += new System.EventHandler(this.menuItem63_Click);
			// 
			// menuItem64
			// 
			this.menuItem64.Index = 3;
			this.menuItem64.MergeOrder = 39;
			this.menuItem64.Text = "Báo cáo chi tiết kinh phí hoạt động";
			this.menuItem64.Click += new System.EventHandler(this.menuItem64_Click);
			// 
			// menuItem65
			// 
			this.menuItem65.Index = 4;
			this.menuItem65.MergeOrder = 40;
			this.menuItem65.Text = "Báo cáo chi tiết kinh phí dự án";
			this.menuItem65.Click += new System.EventHandler(this.menuItem65_Click);
			// 
			// menuItem67
			// 
			this.menuItem67.Index = 5;
			this.menuItem67.MergeOrder = 41;
			this.menuItem67.Text = "Báo cáo thu chi hoạt động sự nghiệp";
			this.menuItem67.Click += new System.EventHandler(this.menuItem67_Click);
			// 
			// menuItem68
			// 
			this.menuItem68.Index = 6;
			this.menuItem68.MergeOrder = 42;
			this.menuItem68.Text = "Báo cáo tổng hợp tăng giảm tài sản cố định";
			this.menuItem68.Click += new System.EventHandler(this.menuItem68_Click);
			// 
			// menuItem69
			// 
			this.menuItem69.Index = 7;
			this.menuItem69.MergeOrder = 43;
			this.menuItem69.Text = "Báo cáo số kinh phí chưa sử dụng năm trước chuyển sang";
			this.menuItem69.Click += new System.EventHandler(this.menuItem69_Click);
			// 
			// m83
			// 
			this.m83.Index = 8;
			this.m83.MergeOrder = 44;
			this.m83.Text = "Bảng đối chiếu dự toán kinh phí ngân sách tại kho bạc nhà nước";
			this.m83.Click += new System.EventHandler(this.m83_Click);
			// 
			// menuItem72
			// 
			this.menuItem72.Index = 9;
			this.menuItem72.MergeOrder = 45;
			this.menuItem72.Text = "Bảng đối chiếu tình hình tạm ứng và thanh toán tạm ứng kinh phí ngân sách tại KBN" +
				"N";
			this.menuItem72.Click += new System.EventHandler(this.menuItem72_Click);
			// 
			// menuItem87
			// 
			this.menuItem87.Index = 10;
			this.menuItem87.MergeOrder = 46;
			this.menuItem87.Text = "Bảng cân đối kế toán";
			this.menuItem87.Click += new System.EventHandler(this.menuItem87_Click);
			// 
			// menuItem88
			// 
			this.menuItem88.Index = 11;
			this.menuItem88.MergeOrder = 47;
			this.menuItem88.Text = "Báo cáo kết quả hoạt động kinh doanh";
			this.menuItem88.Click += new System.EventHandler(this.menuItem88_Click);
			// 
			// menuItem89
			// 
			this.menuItem89.Index = 12;
			this.menuItem89.MergeOrder = 48;
			this.menuItem89.Text = "Báo cáo lưu chuyển tiền tệ";
			this.menuItem89.Click += new System.EventHandler(this.menuItem89_Click);
			// 
			// menuItem70
			// 
			this.menuItem70.Index = 3;
			this.menuItem70.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem73,
																					   this.menuItem74,
																					   this.menuItem75,
																					   this.menuItem76,
																					   this.menuItem77,
																					   this.menuItem78,
																					   this.menuItem79,
																					   this.menuItem81,
																					   this.menuItem82,
																					   this.menuItem83,
																					   this.menuItem84});
			this.menuItem70.MergeOrder = 9004;
			this.menuItem70.Text = "Báo cáo doanh nghiệp";
			// 
			// menuItem73
			// 
			this.menuItem73.Index = 0;
			this.menuItem73.MergeOrder = 49;
			this.menuItem73.Text = "Sổ nhật ký thu tiền";
			this.menuItem73.Click += new System.EventHandler(this.menuItem73_Click);
			// 
			// menuItem74
			// 
			this.menuItem74.Index = 1;
			this.menuItem74.MergeOrder = 50;
			this.menuItem74.Text = "Sổ nhật ký chi tiền";
			this.menuItem74.Click += new System.EventHandler(this.menuItem74_Click);
			// 
			// menuItem75
			// 
			this.menuItem75.Index = 2;
			this.menuItem75.MergeOrder = 51;
			this.menuItem75.Text = "Sổ nhật ký mua hàng";
			this.menuItem75.Click += new System.EventHandler(this.menuItem75_Click);
			// 
			// menuItem76
			// 
			this.menuItem76.Index = 3;
			this.menuItem76.MergeOrder = 52;
			this.menuItem76.Text = "Sổ nhật ký bán hàng";
			this.menuItem76.Click += new System.EventHandler(this.menuItem76_Click);
			// 
			// menuItem77
			// 
			this.menuItem77.Index = 4;
			this.menuItem77.MergeOrder = 53;
			this.menuItem77.Text = "Sổ chi tiết thanh toán với người mua (Người bán) (S31-DN)";
			this.menuItem77.Click += new System.EventHandler(this.menuItem77_Click);
			// 
			// menuItem78
			// 
			this.menuItem78.Index = 5;
			this.menuItem78.MergeOrder = 54;
			this.menuItem78.Text = "Sổ chi tiết tiền vay (S34-DN)";
			this.menuItem78.Click += new System.EventHandler(this.menuItem78_Click);
			// 
			// menuItem79
			// 
			this.menuItem79.Index = 6;
			this.menuItem79.MergeOrder = 55;
			this.menuItem79.Text = "Sổ chi tiết bán hàng (S35-DN)";
			this.menuItem79.Click += new System.EventHandler(this.menuItem79_Click);
			// 
			// menuItem81
			// 
			this.menuItem81.Index = 7;
			this.menuItem81.MergeOrder = 56;
			this.menuItem81.Text = "Sổ chi phí sản xuất - kinh doanh (S36-DN)";
			this.menuItem81.Click += new System.EventHandler(this.menuItem81_Click);
			// 
			// menuItem82
			// 
			this.menuItem82.Index = 8;
			this.menuItem82.MergeOrder = 57;
			this.menuItem82.Text = "Sổ tổng hợp chi phí";
			this.menuItem82.Click += new System.EventHandler(this.menuItem82_Click);
			// 
			// menuItem83
			// 
			this.menuItem83.Index = 9;
			this.menuItem83.MergeOrder = 58;
			this.menuItem83.Text = "Sổ chi tiết chi phí";
			this.menuItem83.Click += new System.EventHandler(this.menuItem83_Click);
			// 
			// menuItem84
			// 
			this.menuItem84.Index = 10;
			this.menuItem84.MergeOrder = 59;
			this.menuItem84.Text = "Tổng hợp tài khoản tiền gửi";
			this.menuItem84.Click += new System.EventHandler(this.menuItem84_Click);
			// 
			// menuItem3
			// 
			this.menuItem3.Index = 4;
			this.menuItem3.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem27,
																					  this.menuItem19,
																					  this.menuItem42,
																					  this.menuItem44,
																					  this.menuItem43,
																					  this.m61,
																					  this.m95,
																					  this.menuItem50,
																					  this.menuItem8,
																					  this.menuItem23,
																					  this.menuItem24,
																					  this.menuItem80,
																					  this.menuItem25,
																					  this.menuItem104,
																					  this.m24,
																					  this.menuItem102,
																					  this.menuItem9,
																					  this.menuItem86,
																					  this.menuItem85,
																					  this.m60});
			this.menuItem3.MergeOrder = 9005;
			this.menuItem3.Text = "Tiện ích";
			// 
			// menuItem27
			// 
			this.menuItem27.Index = 0;
			this.menuItem27.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem28,
																					   this.menuItem29,
																					   this.menuItem30,
																					   this.menuItem31,
																					   this.menuItem32,
																					   this.menuItem33,
																					   this.menuItem34,
																					   this.menuItem35,
																					   this.menuItem36,
																					   this.menuItem37,
																					   this.menuItem38,
																					   this.menuItem39,
																					   this.menuItem40,
																					   this.m64,
																					   this.m66,
																					   this.m67,
																					   this.m68});
			this.menuItem27.MergeOrder = 60;
			this.menuItem27.Text = "Danh mục";
			// 
			// menuItem28
			// 
			this.menuItem28.Index = 0;
			this.menuItem28.MergeOrder = 61;
			this.menuItem28.Text = "Hệ thống tài khoản";
			this.menuItem28.Click += new System.EventHandler(this.menuItem28_Click);
			// 
			// menuItem29
			// 
			this.menuItem29.Index = 1;
			this.menuItem29.MergeOrder = 62;
			this.menuItem29.Text = "Tài khoản mở tại ngân hàng, kho bạc";
			this.menuItem29.Click += new System.EventHandler(this.menuItem29_Click);
			// 
			// menuItem30
			// 
			this.menuItem30.Index = 2;
			this.menuItem30.MergeOrder = 63;
			this.menuItem30.Text = "Loại khoản";
			this.menuItem30.Click += new System.EventHandler(this.menuItem30_Click);
			// 
			// menuItem31
			// 
			this.menuItem31.Index = 3;
			this.menuItem31.MergeOrder = 64;
			this.menuItem31.Text = "Bộ phận";
			this.menuItem31.Click += new System.EventHandler(this.menuItem31_Click);
			// 
			// menuItem32
			// 
			this.menuItem32.Index = 4;
			this.menuItem32.MergeOrder = 65;
			this.menuItem32.Text = "Nguồn kinh phí";
			this.menuItem32.Click += new System.EventHandler(this.menuItem32_Click);
			// 
			// menuItem33
			// 
			this.menuItem33.Index = 5;
			this.menuItem33.MergeOrder = 66;
			this.menuItem33.Text = "Dự án";
			this.menuItem33.Click += new System.EventHandler(this.menuItem33_Click);
			// 
			// menuItem34
			// 
			this.menuItem34.Index = 6;
			this.menuItem34.MergeOrder = 67;
			this.menuItem34.Text = "Mục, tiểu mục";
			this.menuItem34.Click += new System.EventHandler(this.menuItem34_Click);
			// 
			// menuItem35
			// 
			this.menuItem35.Index = 7;
			this.menuItem35.MergeOrder = 68;
			this.menuItem35.Text = "Nhân viên";
			this.menuItem35.Click += new System.EventHandler(this.menuItem35_Click);
			// 
			// menuItem36
			// 
			this.menuItem36.Index = 8;
			this.menuItem36.MergeOrder = 69;
			this.menuItem36.Text = "Khách hàng";
			this.menuItem36.Click += new System.EventHandler(this.menuItem36_Click);
			// 
			// menuItem37
			// 
			this.menuItem37.Index = 9;
			this.menuItem37.MergeOrder = 70;
			this.menuItem37.Text = "Loại chứng từ";
			this.menuItem37.Click += new System.EventHandler(this.menuItem37_Click);
			// 
			// menuItem38
			// 
			this.menuItem38.Index = 10;
			this.menuItem38.MergeOrder = 71;
			this.menuItem38.Text = "Tài khoản ghi đồng thời - dự toán ngân sách";
			this.menuItem38.Click += new System.EventHandler(this.menuItem38_Click);
			// 
			// menuItem39
			// 
			this.menuItem39.Index = 11;
			this.menuItem39.MergeOrder = 72;
			this.menuItem39.Text = "Tài khoàn năm nay chuyển sang tài khoản năm trước";
			this.menuItem39.Click += new System.EventHandler(this.menuItem39_Click);
			// 
			// menuItem40
			// 
			this.menuItem40.Index = 12;
			this.menuItem40.MergeOrder = 73;
			this.menuItem40.Text = "Quyết toán kinh phí đã sử dụng năm trước";
			this.menuItem40.Click += new System.EventHandler(this.menuItem40_Click);
			// 
			// m64
			// 
			this.m64.Index = 13;
			this.m64.MergeOrder = 74;
			this.m64.Text = "Danh mục nhóm báo cáo";
			this.m64.Click += new System.EventHandler(this.m64_Click);
			// 
			// m66
			// 
			this.m66.Index = 14;
			this.m66.MergeOrder = 75;
			this.m66.Text = "Danh mục loại khoản mục";
			this.m66.Click += new System.EventHandler(this.m66_Click);
			// 
			// m67
			// 
			this.m67.Index = 15;
			this.m67.MergeOrder = 76;
			this.m67.Text = "Danh mục khoản mục";
			this.m67.Click += new System.EventHandler(this.m67_Click);
			// 
			// m68
			// 
			this.m68.Index = 16;
			this.m68.MergeOrder = 77;
			this.m68.Text = "Lập công thức báo cáo tài chính";
			this.m68.Click += new System.EventHandler(this.m68_Click);
			// 
			// menuItem19
			// 
			this.menuItem19.Index = 1;
			this.menuItem19.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					   this.menuItem20,
																					   this.menuItem21});
			this.menuItem19.MergeOrder = 78;
			this.menuItem19.Text = "Khai báo số dư đầu năm";
			// 
			// menuItem20
			// 
			this.menuItem20.Index = 0;
			this.menuItem20.MergeOrder = 79;
			this.menuItem20.Text = "Số dư";
			this.menuItem20.Click += new System.EventHandler(this.menuItem20_Click);
			// 
			// menuItem21
			// 
			this.menuItem21.Index = 1;
			this.menuItem21.MergeOrder = 80;
			this.menuItem21.Text = "Công nợ";
			this.menuItem21.Click += new System.EventHandler(this.menuItem21_Click);
			// 
			// menuItem42
			// 
			this.menuItem42.Index = 2;
			this.menuItem42.MergeOrder = 82;
			this.menuItem42.Text = "Kiểm tra số dư cuối tháng";
			this.menuItem42.Click += new System.EventHandler(this.menuItem42_Click);
			// 
			// menuItem44
			// 
			this.menuItem44.Index = 3;
			this.menuItem44.MergeOrder = 83;
			this.menuItem44.Text = "Kiểm tra số phát sinh";
			this.menuItem44.Click += new System.EventHandler(this.menuItem44_Click);
			// 
			// menuItem43
			// 
			this.menuItem43.Index = 4;
			this.menuItem43.MergeOrder = 85;
			this.menuItem43.Text = "Chuyển sổ";
			this.menuItem43.Click += new System.EventHandler(this.menuItem43_Click);
			// 
			// m61
			// 
			this.m61.Index = 5;
			this.m61.MergeOrder = 86;
			this.m61.Text = "Thu nhập chứng từ phiếu nhập kho";
			this.m61.Click += new System.EventHandler(this.m61_Click);
			// 
			// m95
			// 
			this.m95.Index = 6;
			this.m95.MergeOrder = 87;
			this.m95.Text = "Thu nhập chứng từ phiếu xuất kho";
			this.m95.Click += new System.EventHandler(this.m95_Click);
			// 
			// menuItem50
			// 
			this.menuItem50.Index = 7;
			this.menuItem50.MergeOrder = 88;
			this.menuItem50.Text = "Thông số hệ thống";
			this.menuItem50.Click += new System.EventHandler(this.menuItem50_Click);
			// 
			// menuItem8
			// 
			this.menuItem8.Index = 8;
			this.menuItem8.MergeOrder = 89;
			this.menuItem8.Text = "Phân quyền theo bệnh viện sử dụng";
			this.menuItem8.Click += new System.EventHandler(this.menuItem8_Click);
			// 
			// menuItem23
			// 
			this.menuItem23.Index = 9;
			this.menuItem23.MergeOrder = 90;
			this.menuItem23.Text = "Phân quyền sử dụng";
			this.menuItem23.Click += new System.EventHandler(this.menuItem23_Click);
			// 
			// menuItem24
			// 
			this.menuItem24.Index = 10;
			this.menuItem24.MergeOrder = 91;
			this.menuItem24.Text = "Thay đổi mật khẩu";
			this.menuItem24.Click += new System.EventHandler(this.menuItem24_Click);
			// 
			// menuItem80
			// 
			this.menuItem80.Index = 11;
			this.menuItem80.MergeOrder = 92;
			this.menuItem80.Text = "Nhật ký người dùng";
			this.menuItem80.Click += new System.EventHandler(this.menuItem80_Click);
			// 
			// menuItem25
			// 
			this.menuItem25.Index = 12;
			this.menuItem25.MergeOrder = 93;
			this.menuItem25.Text = "Sao lưu số liệu";
			this.menuItem25.Click += new System.EventHandler(this.menuItem25_Click);
			// 
			// menuItem104
			// 
			this.menuItem104.Index = 13;
			this.menuItem104.MergeOrder = 94;
			this.menuItem104.Text = "Đổi ngày";
			this.menuItem104.Click += new System.EventHandler(this.menuItem104_Click);
			// 
			// m24
			// 
			this.m24.Index = 14;
			this.m24.MergeOrder = 95;
			this.m24.Text = "Tạo lại số liệu năm";
			this.m24.Click += new System.EventHandler(this.menuItem70_Click_1);
			// 
			// menuItem102
			// 
			this.menuItem102.Index = 15;
			this.menuItem102.MergeOrder = 96;
			this.menuItem102.Text = "Truy vấn theo câu lệnh SQL";
			this.menuItem102.Click += new System.EventHandler(this.menuItem102_Click);
			// 
			// menuItem9
			// 
			this.menuItem9.Index = 16;
			this.menuItem9.MergeOrder = 105;
			this.menuItem9.Text = "-";
			// 
			// menuItem86
			// 
			this.menuItem86.Index = 17;
			this.menuItem86.MergeOrder = 97;
			this.menuItem86.Text = "Kết chuyển cuối kỳ";
			this.menuItem86.Click += new System.EventHandler(this.menuItem86_Click);
			// 
			// menuItem85
			// 
			this.menuItem85.Index = 18;
			this.menuItem85.MergeOrder = 106;
			this.menuItem85.Text = "-";
			// 
			// m60
			// 
			this.m60.Index = 19;
			this.m60.MergeOrder = 98;
			this.m60.Text = "Log Off";
			this.m60.Click += new System.EventHandler(this.menuItem27_Click);
			// 
			// menuItem4
			// 
			this.menuItem4.Index = 5;
			this.menuItem4.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem12,
																					  this.menuItem13,
																					  this.menuItem14});
			this.menuItem4.MergeOrder = 9006;
			this.menuItem4.Text = "&A. Cửa sổ";
			// 
			// menuItem12
			// 
			this.menuItem12.Index = 0;
			this.menuItem12.MergeOrder = 99;
			this.menuItem12.Text = "&1. Hiện cửa sổ theo chiều dọc";
			this.menuItem12.Click += new System.EventHandler(this.menuItem12_Click);
			// 
			// menuItem13
			// 
			this.menuItem13.Index = 1;
			this.menuItem13.MergeOrder = 100;
			this.menuItem13.Text = "&2. Hiện cửa sổ theo chiều ngang";
			this.menuItem13.Click += new System.EventHandler(this.menuItem13_Click);
			// 
			// menuItem14
			// 
			this.menuItem14.Index = 2;
			this.menuItem14.MergeOrder = 101;
			this.menuItem14.Text = "&3. Đóng tất cả các cửa sổ";
			this.menuItem14.Click += new System.EventHandler(this.menuItem14_Click);
			// 
			// menuItem5
			// 
			this.menuItem5.Index = 6;
			this.menuItem5.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] {
																					  this.menuItem15,
																					  this.menuItem16,
																					  this.menuItem17});
			this.menuItem5.MergeOrder = 9007;
			this.menuItem5.Text = "&B. Hướng dẫn";
			// 
			// menuItem15
			// 
			this.menuItem15.Index = 0;
			this.menuItem15.MergeOrder = 102;
			this.menuItem15.Text = "&1. Hướng dẫn sử dụng";
			// 
			// menuItem16
			// 
			this.menuItem16.Index = 1;
			this.menuItem16.MergeOrder = 103;
			this.menuItem16.Text = "-";
			// 
			// menuItem17
			// 
			this.menuItem17.Index = 2;
			this.menuItem17.MergeOrder = 104;
			this.menuItem17.Text = "&2. About";
			this.menuItem17.Click += new System.EventHandler(this.menuItem17_Click);
			// 
			// menuItem6
			// 
			this.menuItem6.Index = 7;
			this.menuItem6.MergeOrder = 9008;
			this.menuItem6.Text = "&C. Kết thúc";
			this.menuItem6.Click += new System.EventHandler(this.menuItem6_Click);
			// 
			// menuItem90
			// 
			this.menuItem90.Index = 7;
			this.menuItem90.MergeOrder = 107;
			this.menuItem90.Text = "Dự toán được giao";
			this.menuItem90.Click += new System.EventHandler(this.menuItem90_Click);
			// 
			// frmMain
			// 
			this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
			this.BackgroundImage = ((System.Drawing.Bitmap)(resources.GetObject("$this.BackgroundImage")));
			this.ClientSize = new System.Drawing.Size(792, -19);
			this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
			this.IsMdiContainer = true;
			this.Menu = this.mainMenu1;
			this.Name = "frmMain";
			this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
			this.Text = "Quản lý kho  .NET";
			this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
			this.Load += new System.EventHandler(this.frmMain_Load);

		}
		#endregion

		/// <summary>
		/// The main entry point for the application.
		/// </summary>
		[STAThread]
		static void Main() 
		{
			Application.Run(new frmMain());
		}

		private bool IsLoaded(string frm)
		{
			Form[] afrm=this.MdiChildren;
			foreach(Form f in afrm)
			{
				if(f.Name.Equals(frm)){f.Activate();return true;}
			}
			return false;
		}

		private void menuItem6_Click(object sender, System.EventArgs e)
		{
			if (MessageBox.Show ("Bạn có muốn kết thúc không ?",this.Text,MessageBoxButtons.YesNo, MessageBoxIcon.Question)== DialogResult.Yes)
			{
				a.set_current();
				Application.Exit();
			}
		}

		private void menuItem12_Click(object sender, System.EventArgs e)
		{
			this.LayoutMdi(System.Windows.Forms.MdiLayout.TileVertical);
		}

		private void menuItem13_Click(object sender, System.EventArgs e)
		{
			this.LayoutMdi(System.Windows.Forms.MdiLayout.TileHorizontal);
		}

		private void menuItem14_Click(object sender, System.EventArgs e)
		{
			Form[] charr= this.MdiChildren;  
			foreach (Form chform in charr) chform.Close();
		}

		private void frmMain_Load(object sender, System.EventArgs e)
		{
			Splasher.Show();			
			Splasher.Status = "Connecting to Oracle Server ...";
			ds=a.get_data("select * from d_dlogin where id=0");
			//Application.DoEvents();
			System.Threading.Thread.Sleep(1000);//2350
			Splasher.Close();
			frmLogin f=new frmLogin(a);
			f.ShowDialog(this);
			if (f.mUserid!="")
			{
				s_userid=f.mUserid;
				s_right=f.mRight;
				i_userid=f.iUserid;
				b_admin=f.bAdmin;
				s_chuong=f.mChuong;
				s_lk=f.mLk;
				s_chucnang=f.mChucnang;
				s_lctug=f.mLctug;
				s_nghiepvu=f.mNghiepvu;
				s_ngay=f.mNgay;
				s_mmyy=f.mMmyy;				
				s_yyyy=f.mNgay.Split('/')[2].ToString().Trim();
				//if (this.m60.Text!="Log Off") this.Text = a.Msg +" - " + s_ngay + " - " + s_userid.Trim() + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
			}
			else Application.Exit();
			gan_right();
		}



		private void menuItem17_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmAbout")) return;
			frmAbout f=new frmAbout("ketoan",f_get_menu());
			f.MdiParent=this;
			f.Show();		
		}

		private void menuItem27_Click(object sender, System.EventArgs e)
		{
			menuItem14_Click(null,null);
			frmLogin f=new frmLogin(a);
			f.ShowDialog(this);
			if (f.mUserid!="")
			{
				s_userid=f.mUserid;
				s_right=f.mRight;
				i_userid=f.iUserid;
				b_admin=f.bAdmin;
				s_chuong=f.mChuong;
				s_lk=f.mLk;
				s_chucnang=f.mChucnang;
				s_lctug=f.mLctug;
				s_nghiepvu=f.mNghiepvu;
				s_mmyy=f.mMmyy;
				s_ngay=f.mNgay;
				this.Text = a.Msg+ " - " + s_ngay + " - " + s_userid.Trim() + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
			}
			else Application.Exit();
			gan_right();
		}

		private void menuItem25_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmThumuc")) return;
			try
			{
				string s="";
				foreach(DataRow r in a.get_data("select ten from d_thongso where id=3").Tables[0].Rows)
				{
					s=r["ten"].ToString();
					break;
				}
				frmThumuc f=new frmThumuc(s,"Chọn thư mục sao lưu số liệu",1,0,s_mmyy);
				f.ShowDialog();
			}
			catch{}
		}

		private void menuItem102_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmTVuser")) return;
			frmTVuser f=new frmTVuser(a);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem104_Click(object sender, System.EventArgs e)
		{
			menuItem14_Click(null,null);
			frmDoingay f=new frmDoingay(a,s_mmyy,i_userid);
			f.ShowDialog();
			if (f.mMmyy!="")
			{
				s_mmyy=f.mMmyy;s_ngay=f.mNgay;
				this.Text = a.Msg+ " - " + s_ngay + " - " + s_userid.Trim() + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
			}
		}

		private void menuItem70_Click_1(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmTaouser")) return;
			frmTaouser f=new frmTaouser(a);
			f.MdiParent=this;
			f.Show();
		}

		private void gan_right()
		{
			int n = 0, t = 0;
			bool bx = false;
			for (int i = 0; i < this.mainMenu1.MenuItems.Count - 3; i++)
			{
				bx = false;

				for (int j = 0; j < this.mainMenu1.MenuItems[i].MenuItems.Count; j++)
				{

					if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems.Count == 0)
					{
						if (this.mainMenu1.MenuItems[i].MenuItems[j].Text != "-")
						{
							this.mainMenu1.MenuItems[i].MenuItems[j].Visible = s_right.IndexOf(this.mainMenu1.MenuItems[i].MenuItems[j].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
							if (!bx)
								bx = this.mainMenu1.MenuItems[i].MenuItems[j].Visible;
						}
						else
						{
							this.mainMenu1.MenuItems[i].MenuItems[j].Visible = false;
						}
					}
					else
					{
						n = 0;
						for (int k = 0; k < this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems.Count; k++)
						{
							if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems.Count == 0)
							{
								if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Text != "-")
									this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible = s_right.IndexOf(this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
								else this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible = false;
								n += (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible) ? 1 : 0;

							}
							else
							{
								t = 0;
								for (int s = 0; s < this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems.Count; s++)
								{
									if (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Text != "-")
										this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Visible = s_right.IndexOf(this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].MergeOrder.ToString().PadLeft(3, '0') + "+") != -1;
									else this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Visible = false;
									t += (this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].MenuItems[s].Visible) ? 1 : 0;
								}
								this.mainMenu1.MenuItems[i].MenuItems[j].MenuItems[k].Visible = n != 0;

							}
						}
						this.mainMenu1.MenuItems[i].MenuItems[j].Visible = n != 0;
						if (!bx)
							bx = (n != 0) ? true : false;
					}
					this.mainMenu1.MenuItems[i].Visible = bx;

				}
			}

			this.m60.Text="Log Off "+s_userid.ToString().Trim();
			this.m60.Visible=true;
			this.menuItem104.Visible=true;
			this.menuItem3.Visible=true;
			this.menuItem9.Visible=true;
			if (s_userid==LibKetoan.AccessData.links_userid+LibKetoan.AccessData.links_pass)
			{
				this.menuItem3.Visible=true;
				this.menuItem23.Visible=true;
				this.menuItem8.Visible=true;
				this.menuItem50.Visible=true;
				this.m60.Text="Log Off Administrator(Links)";
			}
			else 
				this.Text = a.Msg +" - " + s_ngay + "- Tháng" + " " + s_mmyy.Substring(0, 2) + "/20" + s_mmyy.Substring(2, 2);
		}

		private TreeNode f_get_menu()
		{
			TreeNode anode, anode1;
			anode = new TreeNode("Chức năng");
			anode.Tag = "menuChucnang";
			anode.Text = "Chức năng";
			foreach (MenuItem mi in this.mainMenu1.MenuItems)
			{
				MenuItem mnuitem = (MenuItem)(mi);
				if (mnuitem == menuItem4 || mnuitem == menuItem5 || mnuitem == menuItem6) break;

				anode1 = new TreeNode(mnuitem.Text.Replace("&", ""));
				anode1.Tag = mnuitem.MergeOrder.ToString().PadLeft(3, '0');
				anode.Nodes.Add(anode1);
				if (mnuitem.MenuItems.Count > 0)
				{
					f_Add_Node(anode1, mnuitem);
				}

			}
			anode.ExpandAll();
			return anode;
		}

		private void f_Add_Node(TreeNode v_node, MenuItem v_item)
		{
			TreeNode anode;
			foreach (MenuItem ait in v_item.MenuItems)
			{
				if (ait.GetType().ToString() == "System.Windows.Forms.MenuItem")
				{
					MenuItem amenu = (MenuItem)(ait);
					if (amenu.Text != "-")// && amenu != menuItem8)
					{
						anode = new TreeNode(amenu.Text.Replace("&", ""));
						anode.Tag = amenu.MergeOrder.ToString().PadLeft(3, '0');
						anode.Text = amenu.Text.Replace("&", "");
						v_node.Nodes.Add(anode);
						if (amenu.MenuItems.Count > 0)
						{
							f_Add_Node(anode, amenu);
						}
					}
				}
			}
		}

		private void menuItem24_Click(object sender, System.EventArgs e)
		{
			string s_userid=a.get_data("select userid from a_dlogin where id="+i_userid).Tables[0].Rows[0][0].ToString();
			string s_psw=a.get_data("select password_ from a_dlogin where id="+i_userid).Tables[0].Rows[0][0].ToString();
			frmUser f=new frmUser(a,a.get_data("select * from a_dlogin"),i_userid.ToString(),s_userid,s_psw,s_right,false);
			f.ShowDialog(this);
		}

		private void menuItem33_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmng")) return;
			frmDmng f=new frmDmng(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem42_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmKiemtrasd")) return;
			frmKiemtrasd f=new frmKiemtrasd(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem44_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmKiemtrafs")) return;
			frmKiemtrafs f=new frmKiemtrafs(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem43_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmChuyenso")) return;
			frmChuyenso f=new frmChuyenso(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m0_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapct")) return;
			frmNhapct f=new frmNhapct(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,1,i_userid,"Chứng từ tiền mặt",b_admin,a.lctug_dutoanns_tm,0);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem20_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmSodu")) return;
			frmSodu f=new frmSodu(a,s_mmyy,s_chuong,s_lk,s_nghiepvu,i_userid,"Số dư năm 20"+s_mmyy.Substring(2),b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem21_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmCongno")) return;
			frmCongno f=new frmCongno(a,s_mmyy,s_chuong,s_lk,s_nghiepvu,i_userid,"Công nợ năm 20"+s_mmyy.Substring(2),b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void m2_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapct")) return;
			frmNhapct f=new frmNhapct(a,s_mmyy,s_ngay,s_chuong,s_lk,LibKetoan.AccessData.lctug_k.ToString()+",",s_nghiepvu,LibKetoan.AccessData.chucnang_k,i_userid,"Chứng từ khác",b_admin,a.lctug_dutoanns,0);
			f.MdiParent=this;
			f.Show();		
		}

		private void m1_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapng")) return;
			frmNhapng f=new frmNhapng(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,2,i_userid,"Chứng từ ngân hàng - kho bạc",b_admin,a.lctug_dutoanns_nghang,0);
			f.MdiParent=this;
			f.Show();		
		}

		private void menuItem66_Click(object sender, System.EventArgs e)
		{
			/*
			rCandoitk f=new rCandoitk(a,s_chuong,s_lk,s_mmyy);
			f.MdiParent=this;
			f.Show();
			*/
			if (IsLoaded("frmBangcandoitk")) return;
			frmBangcandoitk f=new frmBangcandoitk(a);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem28_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmtk")) return;
			frmDmtk f=new frmDmtk(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m61_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmImpnhap")) return;
			frmImpnhap f=new frmImpnhap(a,s_mmyy,s_ngay,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem23_Click(object sender, System.EventArgs e)
		{
			try
			{
				DataSet ads_menu=new DataSet();
				try
				{
					ads_menu = a.get_data("select * from a_menuitem order by id");
					int i = int.Parse(ads_menu.Tables[0].Rows[0][0].ToString());
				}
				catch
				{
					a.execute_data(" create table a_menuitem(id varchar2(5),id_goc varchar2(5),stt number(5) default 0,id_menu varchar2(5),ten nvarchar2(500)  ,constraint pk_a_menuitem primary key(id))");
					ads_menu = a.get_data("select * from a_menuitem order by id");
				}
				if(ads_menu.Tables[0].Rows.Count<=0)
				{
					frmRight f=new frmRight(a,0,f_get_menu());
					f.MdiParent=this;
					f.Show();
				}
				else
				{
					frmRight f=new frmRight(a,0);
					f.MdiParent=this;
					f.Show();
				}
			}
			catch
			{
			}
		}

		private void menuItem50_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmThongso")) return;
			frmThongso f=new frmThongso(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem8_Click(object sender, System.EventArgs e)
		{
			frmRight_BV f=new frmRight_BV(a,f_get_menu());
			f.MdiParent=this;
			f.Show();
		}

		private void m63_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmNhapct")) return;
			frmNhapct f=new frmNhapct(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,5,i_userid,"Chứng từ tiền mặt",b_admin,a.lctug_dutoanns_vattu,0);
			f.MdiParent=this;
			f.Show();		
		}

		private void menuItem80_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmEvent")) return;
			frmEvent f=new frmEvent(a);
			f.MdiParent=this;
			f.Show();
		}

		private void m64_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmnhombc")) return;
			frmDmnhombc f=new frmDmnhombc(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void m65_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmBkchungtu")) return;
			frmBkchungtu f=new frmBkchungtu(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem36_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmdt")) return;
			frmDmdt f=new frmDmdt(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem35_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmnv")) return;
			frmDmnv f=new frmDmnv(a,s_mmyy,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem37_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmBcnghang")) return;
			frmBcnghang f=new frmBcnghang(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void m4_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmCtgs")) return;
			frmTsctgs f=new frmTsctgs(a,s_mmyy,i_userid);
			f.ShowDialog();
			if (f.mmyy!="")
			{
				frmCtgs f1=new frmCtgs(a,s_mmyy,s_ngay,f.iNhom,f.iChucnang,f.iLctug,f.iChuong,f.iLk,i_userid);
				f1.MdiParent=this;
				f1.Show();
			}
		}

		private void menuItem30_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmlk")) return;
			frmDmlk f=new frmDmlk(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem29_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmnh")) return;
			frmDmnh f=new frmDmnh(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem31_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmBtdkp")) return;
			frmBtdkp f=new frmBtdkp(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m66_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmloaikm")) return;
			frmDmloaikm f=new frmDmloaikm(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m67_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmkhoanmuc")) return;
			frmDmkhoanmuc f=new frmDmkhoanmuc(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem32_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDmng1")) return;
			frmDmng1 f=new frmDmng1(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void m68_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmMaubc")) return;
			frmMaubc f=new frmMaubc(a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m6_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SQTM1");
			frmReport_sc f = new frmReport_sc(a,"SQTM1",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem49_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SDKCTGS");
			frmReportCTGS f = new frmReportCTGS(a,"SDKCTGS");
			f.MdiParent=this;
			f.Show();
		}

		private void m69_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTGS");
			frmReportCTGS f = new frmReportCTGS(a,"SCTGS");
			f.MdiParent=this;
			f.Show();
		}

		private void m70_Click(object sender, System.EventArgs e)
		{
			frmSocai_ct_theomuc f = new frmSocai_ct_theomuc(a);
			//frmReportPublic f=new frmReportPublic(a,"SCMUC");
			f.MdiParent=this;
			f.Show();
		}

		private void m71_Click(object sender, System.EventArgs e)
		{
			//frmSocai f=new frmSocai(a);
			frmReport_sc f = new frmReport_sc(a,"SCTH",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m72_Click(object sender, System.EventArgs e)
		{
			//frmReportNguon f=new frmReportNguon("SOCAI_S3b",a);
			frmReport_sc f = new frmReport_sc(a,"SOCAI_S3b",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m73_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"TGNHCT");
			frmReport_sc f=new frmReport_sc(a,"TGNHCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m74_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"TGNHTH");
			frmReport_sc f = new frmReport_sc(a,"TGNHTH",i_userid);
			f.MdiParent=this;
			f.Show();
		}
		private void m13_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"STHCN");
			frmReport_sc f = new frmReport_sc(a,"STHCN",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem48_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"STDTU");
			frmReport_sc f = new frmReport_sc(a,"STDTU",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem58_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"BTHCT");
			frmReport_sc f = new frmReport_sc(a,"BTHCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m16_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("CTChiDuAn",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m17_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("CTChiHoatDong",a,i_userid);
			f.MdiParent=this;
			f.Show();		
		}

		private void m18_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("TheoDoiNguonKP",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m19_Click(object sender, System.EventArgs e)
		{
			frmReportNguon f=new frmReportNguon("THNguonKP",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem38_Click(object sender, System.EventArgs e)
		{
			string user=a.user;
			frmDmhachtoan f=new frmDmhachtoan(a,s_mmyy,"select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('461','462')","select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('008','009')",3,"Tài khoản ghi đồng thời - dự toán ngân sách","Số tài khoản","Tài khoản ghi đồng thời",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem39_Click(object sender, System.EventArgs e)
		{
			string user=a.user;
			frmDmhachtoan f=new frmDmhachtoan(a,s_mmyy,"select * from "+user+".a_dmtk where c=1 and (substr(stk,1,4) in ('4612','6612') or substr(stk,1,3) in ('462','662'))","select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('461','462','661','662')",1,"Tài khoàn năm nay chuyển sang tài khoản năm trước","Số tài khoản năm nay","Số tài khoản năm trước",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem40_Click(object sender, System.EventArgs e)
		{
			string user=a.user;
			frmDmhachtoan f=new frmDmhachtoan(a,s_mmyy,"select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('461','462')","select * from "+user+".a_dmtk where c=1 and substr(stk,1,3) in ('661','662')",2,"Quyết toán kinh phí đã sử dụng năm trước","Số tài khoản nợ","Số tài khoản có",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m3_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmTimct")) return;
			frmTimct f=new frmTimct(a,s_mmyy,s_ngay,s_chuong,s_lk,s_lctug,s_nghiepvu,s_chucnang,i_userid,"Tìm kiếm chứng từ",b_admin);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem22_Click(object sender, System.EventArgs e)
		{
			
		}

		private void menuItem56_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("GiaoDuToan",a,i_userid);
			f.MdiParent=this;
			f.Show();	
		}

		private void menuItem10_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_mKPI",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem60_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SCTKT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem57_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("NhanDuToan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem11_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SQTMCT",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem64_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_CTkinhphihoatdong",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem48_Click_1(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTTK");
			frmReport_sc f = new frmReport_sc(a,"SCTTK",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem71_Click(object sender, System.EventArgs e)
		{
			//frmReportPublic f=new frmReportPublic(a,"SCTTK");
			frmReport_sc f = new frmReport_sc(a,"SCTTK_M2",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem65_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("tc_CTkinhphiduan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m95_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmImpxuat")) return;
			frmImpxuat f=new frmImpxuat(a,s_mmyy,s_ngay,i_userid);
			f.MdiParent=this;
			f.Show();			
		}

		private void menuItem63_Click(object sender, System.EventArgs e)
		{
			frmReport_kp f=new frmReport_kp("QuyetToanKP",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem67_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("ThuChiHoatDongSuNghiepSXKD",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem68_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("TangGiamTSCD",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem69_Click(object sender, System.EventArgs e)
		{	
			frmReport_kp1 f=new frmReport_kp1("KPChuaSuDung",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void m83_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("dutoan_nskhobac",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem59_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("TamungKP_KhoBac",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem72_Click(object sender, System.EventArgs e)
		{
			frmReport_dtns f = new frmReport_dtns("TamungKP_KhoBac_TM",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem73_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoNhatKyThuTien",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem74_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoNhatKyChiTien",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem75_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoNhatKyMuaHang",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem77_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietS31",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem78_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietS34",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem79_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietS35",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem81_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiPhiSanXuatKD",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem82_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoTongHopChiPhi",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem83_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"SoChiTietChiPhi",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem84_Click(object sender, System.EventArgs e)
		{
			frmReport_sc f = new frmReport_sc(a,"TongHopTaiKhoanTienGui",i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem76_Click(object sender, System.EventArgs e)
		{
			try
			{
				frmReport_sc f = new frmReport_sc(a,"SoNhatKyBanHang",i_userid);
				f.MdiParent=this;
				f.Show();
			}
			catch (Exception Ex)
			{
				MessageBox.Show("Error : " + Ex ,"Thông báo !");
			}	
				
		}

		private void menuItem86_Click(object sender, System.EventArgs e)
		{			
			frmKetchuyen f = new frmKetchuyen(a,s_mmyy,i_userid,s_yyyy);
			f.MdiParent=this;
			f.Show();
		}
		private void menuItem34_Click(object sender, System.EventArgs e)
		{
			frmDmmlns f = new frmDmmlns(a,i_userid,s_mmyy);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem87_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("BangCanDoiKeToan",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem88_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("KetQuaHoatDongKinhDoanh",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem89_Click(object sender, System.EventArgs e)
		{
			frmReport_kp1 f=new frmReport_kp1("LuuChuyenTienTe",a,i_userid);
			f.MdiParent=this;
			f.Show();
		}

		private void menuItem90_Click(object sender, System.EventArgs e)
		{
			if (IsLoaded("frmDutoanns")) return;
			frmDutoanns f=new frmDutoanns(a,s_mmyy,s_ngay,s_chuong,s_lk,i_userid,"Dự toán được giao tháng "+s_mmyy.Substring(0,2)+" năm 20"+s_mmyy.Substring(2),b_admin);
			f.MdiParent=this;
			f.Show();
		}
	}
}
